<?php defined('In33hao') or exit('Access Invalid!');?>

<div class="tabmenu">
 <ul class="tab pngFix">    
<!--  <li class="active"><a href="#">佣金管理</a></li>-->
<li <?php if($_GET['state'] == 0){?> class="active" <?php }?>><a href="index.php?act=<?php if($output['class']==0){ echo "cash"; }if($output['class']==1){ echo "cash_store"; } if($output['class']==2){ echo "cash_promotion"; } if($output['class']==3||$output['class']==4){ echo "cash_agent"; } if($output['class']==5){ echo "cash_sq"; }
    ?>&op=index&state=0">审核中</a></li>
<li <?php if($_GET['state'] == 1){?> class="active" <?php }?>><a href="index.php?act=<?php if($output['class']==0){ echo "cash"; }if($output['class']==1){ echo "cash_store"; } if($output['class']==2){ echo "cash_promotion"; } if($output['class']==3||$output['class']==4){ echo "cash_agent"; } if($output['class']==5 ){ echo "cash_sq"; }
    ?>&op=index&state=1">提现成功</a></li>
  <li <?php if($_GET['state'] == 2){?> class="active" <?php }?>><a href="index.php?act=<?php if($output['class']==0){ echo "cash"; }if($output['class']==1){ echo "cash_store"; } if($output['class']==2){ echo "cash_promotion"; } if($output['class']==3||$output['class']==4){ echo "cash_agent"; } if($output['class']==5 ){ echo "cash_sq"; } ?>&op=index&state=2">提现失败</a></li>

 </ul>
  </div>
  <div class="alert alert-block mt10 mb10">
      <ul>
          <li>1、相关佣金管理会在会员的账户中操作。</li>
          <li>2、相关佣金管理费用在会员的账户中结算。</li>
          <li>3、<strong style="color: red">你可以根据时间条件搜索佣金管理，然后选择相应的操作</strong>。</li>
    </ul>
  </div>
<table class="search-form">
<form method="get" action="index.php" target="_self">
    <input type="hidden" name="act" value="store_preds" />
    <input type="hidden" name="op" value="pdcash_list" />
    <input type="hidden" name="state" value="<?php echo $_GET['state'];?>" />
    <input type="hidden" name="paystate" value="<?php echo $_GET['paystate'];?>" />
    <tr>
        <td class="w160" style="float:right"><input class="text" type="text" class="w160" name="name" placeholder="请输入单号或会员名称"  value="<?php echo $output['name'];?>"   /></td>
      <td class="w70 tc"><label class="submit-border">
        <input name="submit" type="submit" class="submit" value="<?php echo $lang['nc_search'];?>" />
      </label>
      </td>
    </tr>
  </form>
</table>
  <form method="post" action="index.php?act=cash&op=export_push" id="forms">
    <table class="search-form">
          <th>状态</th>
        <td><select name="select_state">
                <option value="0|0">审核中</option>
                <option value="1|1">支付成功</option>
                <option value="2|0">支付失败</option>
            </select>
        </td>         
        <td>
           <input type="text"   readonly="readonly" value="" id="txt_startdate" name="startdate" size="15"/><label class="add-on">
<i class="icon-calendar"></i></label>
           <input type="text" readonly="readonly" value="" id="txt_enddate" size="15" name="enddate"/><label class="add-on">
<i class="icon-calendar"></i></label>        
        </td>       
        <th>起始条数</th>
        <td><input type="text" value="0" id="txt_keyword" name="startnum"  size="10"/></td>
        <th>结束条数</th>
        <td><input type="text" value="1000" id="txt_keyword" name="endnum" size="10"/></td>
<!--        <td><label class="submit-border"><input type="submit" value="导出excel"/></label></td>-->
        <td>&nbsp;&nbsp;</td>
    </table>
  </form>
    <!--
  <div class="alert"><span class="mr30">可用金额 : <strong class="mr5 red" style="font-size: 18px;"><?php echo $output['member_info']['available_predeposit']; ?></strong>元</span><span>冻结金额 : <strong class="mr5 blue" style="font-size: 18px;"><?php echo $output['member_info']['freeze_predeposit']; ?></strong>元</span></div>
  <form method="get" action="index.php">
    <table class="search-form">
      <input type="hidden" name="act" value="store_preds" />
      <input type="hidden" name="op" value="pdcash_push" />
      <tr>
      <th></th><td></td>
        <th>状态</th>
        <td class="w90"><select id="paystate_search" name="paystate_search">
            <option value="0"><?php echo $lang['nc_please_choose'];?></option>
            <option <?php if ($_GET['paystate_search'] == '0') echo 'selected';?> value="0">未支付</option>
            <option <?php if ($_GET['paystate_search'] == '1') echo 'selected';?> value="1">已支付</option>
          </select>
       </td>
        <th>申请单号</th>
        <td class="w160 tc"><input type="text" class="text w150" name="sn_search" value="<?php echo $_GET['sn_search'];?>"/></td>
        <td class="w70 tc"><label class="submit-border"><input type="submit" class="submit" value="<?php echo $lang['nc_search'];?>" /></label></td>
      </tr>
    </table>
  </form>
  <table class="ncsc-default-table">
    <thead>
      <tr>
        <th>申请单号</th>
        <th>申请时间</th>
        <th>提现金额(<?php echo $lang['currency_zh']; ?>)</th>
        <th class="w150">状态</th>
        <th class="w100">操作</th>
      </tr>
    </thead>
    <tbody>
      <?php  if (count($output['list'])>0) { ?>
      <?php foreach($output['list'] as $val) { ?>
      <tr class="bd-line">
        <td><?php echo $val['order_sn'];?></td>
        <td><?php echo @date('Y-m-d H:i:s',$val['pdc_add_time']);?></td>
        <td><?php echo $val['pdc_amount'];?></td>
        <td><?php echo str_replace(array('0','1'),array('未支付','已支付'),$val['pdc_payment_state']);?></td>

        <td class="nscs-table-handle"><span><a uri="index.php?act=store_preds&op=store_view&id=<?php echo $val['pdc_id']; ?>" nc_type="dialog" dialog_width="480" dialog_title="提现管理" dialog_id="store_view" class="btn-blue" href="javascript:void(0);"><i class="icon-eye-open"></i>
                            <p>查看</p>
                            </a>
                      </span>
    <?php if($val['pdc_payment_state'] == 0){?>        
        <span>
            <a uri="index.php?act=store_preds&op=store_edit&id=<?php echo $val['pdc_id']; ?>" nc_type="dialog" dialog_width="480" dialog_id="store_edit" dialog_title="提现编辑" href="javascript:void(0);" class="btn-blue"><i class="icon-edit"></i><p>编辑</p></a>
        </span>	
    <?php }?>        
        </td>
      </tr>
      <?php } ?>
      <?php } else {?>
      <tr>
        <td colspan="20" class="norecord"><div class="warning-option"><i>&nbsp;</i><span><?php echo $lang['no_record'];?></span></div></td>
      </tr>
      <?php } ?>
    </tbody>
    <tfoot>
      <?php  if (count($output['cash_list'])>0) { ?>
      <tr>
        <td colspan="20"><div class="pagination"><?php echo $output['show_page']; ?></div></td>
      </tr>
      <?php } ?>
    </tfoot>
  </table>
</div>
-->

<table class="ncsc-default-table">
  <thead>
    <tr>
      <th class="w50">提现单号</th>
      <th>会员名称</th>
      <th class="w130">提现金额</th>
      <th class="w130">银行卡号</th>
      <th class="w90"><span class="w130">提现时间</span></th>
      <th class="w90">审核时间</th>
      <th class="w90">提现状态</th>
      <th class="w110">操作</th>
    </tr>
  </thead>
  <tbody>
     <?php foreach($output['list'] as $value) {?> 
   <tr class="bd-line">
      <td><?php echo $value['order_sn'];?></td>
      <td><?php echo $value['member_name'];?></td>
      <td><?php echo $value['cash'];?></td>
      <td><?php echo $value['withdrawals_card'];?></td>
      <td><?php echo date('Y-m-d H:i:s',$value['time']);?></td>
      <td><?php echo empty($value['verification_time']) ? '':date('Y-m-d H:i:s',$value['verification_time']);?></td>
      <td>
            <?php 
                if($value['state'] == 0 && $value['pdc_payment_state'] == 0){
                    echo '<font color="blue">待审核</font>';
                }else if($value['state'] == 1 && $value['pdc_payment_state'] == 1){
                     echo '<font color="green">支付成功</font>';
                }else if($value['state'] == 2 && $value['pdc_payment_state'] == 0){
                     echo '<font color="red">支付失败</font>';
                }
            ?>
      
      </td>
      <td class="nscs-table-handle">
            <span>
                <a href="index.php?act=<?php if($output['class']==0){ echo "cash"; }if($output['class']==1){ echo "cash_store"; } if($output['class']==2){ echo "cash_promotion"; } if($output['class']==3||$output['class']==4){ echo "cash_agent"; } if($output['class']==5){ echo "cash_sq"; }?>&op=edit&id=<?php echo $value['id'];?>" class="btn-blue">
                  <i class="icon-edit"></i>
                  <p>编辑</p>
              </a>
          </span>
      </td>
    </tr>
    
     <?php } ?>
  </tbody>
  <tfoot>
    <tr>
      <td colspan="20"><div class="pagination"><?php echo $output['show_page']; ?></div></td>
    </tr>
  </tfoot>
</table>
<link type="text/css" rel="stylesheet" href="<?php echo RESOURCE_SITE_URL."/js/jquery-ui/themes/ui-lightness/jquery.ui.css";?>"/>
<script type="text/javascript" src="<?php echo RESOURCE_SITE_URL;?>/js/jquery-ui/i18n/zh-CN.js" charset="utf-8" ></script>
<script type="text/javascript">
    $(document).ready(function(){
            $('#txt_startdate').datepicker();
            $('#txt_enddate').datepicker();
    });
</script>